<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript">
var ste="ni gao";
alert(ste.length);
/*var reg=/pattern/;*/
var reg=new RegExp('ni');
alert(reg.exec(ste));//正则表达式
</script>
<body>

</body>
</html>